<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <table class="table">
        <caption align="top"><if condition="ACTION_NAME eq 'news_index'">文章列表<else />回收站列表</if></caption>
        <tr>
            <th>ID</th>
            <th>标题</th>
            <th>所属分类</th>
            <th>发布时间</th>
            <th>操作</th>
        </tr>
        <foreach name="news" item="v">
            <tr>
                <td width="8%">{$v.id}</td>
                <td><a href="{:U('Text',array('id'=>$v['id']))}" >{$v.title}</a><foreach name="v.attr" item="value">
                    <strong style='color:{$value.color}'>[{$value.name}]</strong>
                </foreach></td>
                <td width="12%">{$v.cate}</td>
                <td width="12%">{$v.time|date='y-m-d H:i',###}</td>
                <td width="18%" align="center">
                    <if condition="ACTION_NAME eq 'news_index'">
                        [<a href="{:U('edit',array('id'=>$v['id']))}">修改</a>]
                        [<a href="{:U('toTrash',array('id'=>$v['id'],'type'=>1))}">删除</a>]
                        <else/>
                        [<a href="{:U('toTrash',array('id'=>$v['id'],'type'=>0))}">还原</a>]
                        [<a href="{:U('delete',array('id'=>$v['id']))}">彻底删除</a>]
                    </if>

                </td>
            </tr>

        </foreach>

    </table>
    <if condition="ACTION_NAME eq 'trash'">
        <td colspan="5" align="center">
            [<a href="{:U('deleteAll')}">清空回收站</a>]
        </td>
    </if>
    <div align="center">
        <span class="rows">共{$count}条记录</span>
        {$page}
    </div>

</body>
</html>